﻿using System;
using System.Web;

namespace UmbSearch2
{
	public partial class ReindexSite : umbraco.BasePages.UmbracoEnsuredPage
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

		protected void btnReindex_Click(object sender, EventArgs e)
		{
			DateTime startTime = DateTime.Now;
			Search.Indexer.ReIndex();
			DateTime endTime = DateTime.Now;
			TimeSpan duration = endTime - startTime;
			lblResult.Text = "It took " + duration + " to create a new index";
			lblResult.Visible = true;
		}
	}
}